package com.example.eos.bean;

import com.alibaba.fastjson.annotation.JSONField;
import com.example.eos.tool.GlobalParam;

import java.util.Date;

/**
 * 回复信息
 */
public class Reply {
    private String replyid;

    private String commentid;

    private String userid;

    private String touserid;

    private String reply;

    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date replytime;

    @Override
    public String toString() {
        return "Reply{" +
                "replyid='" + replyid + '\'' +
                ", commentid='" + commentid + '\'' +
                ", userid='" + userid + '\'' +
                ", touserid='" + touserid + '\'' +
                ", reply='" + reply + '\'' +
                ", replytime=" + replytime +
                '}';
    }

    public Reply completReply(Reply reply){
        reply.replyid = GlobalParam.getUUID();
        reply.replytime = GlobalParam.getTime();
        return reply;
    }

    public String getReplyid() {
        return replyid;
    }

    public void setReplyid(String replyid) {
        this.replyid = replyid == null ? null : replyid.trim();
    }

    public String getCommentid() {
        return commentid;
    }

    public void setCommentid(String commentid) {
        this.commentid = commentid == null ? null : commentid.trim();
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid == null ? null : userid.trim();
    }

    public String getTouserid() {
        return touserid;
    }

    public void setTouserid(String touserid) {
        this.touserid = touserid == null ? null : touserid.trim();
    }

    public String getReply() {
        return reply;
    }

    public void setReply(String reply) {
        this.reply = reply == null ? null : reply.trim();
    }

    public Date getReplytime() {
        return replytime;
    }

    public void setReplytime(Date replytime) {
        this.replytime = replytime;
    }
}